package t1_1

import (
	log "github.com/sirupsen/logrus"
	"src/db"
	"src/db/db_modle"
	"src/handler/tools"
	"src/modle"
	"sync"
)

//同一银行卡使用相同身份证注册的个数
func CheckIdOnOneBank(ch *chan modle.DetailsType, sy *sync.WaitGroup, uid uint, rrb db_modle.RiskRuleBase) {
	logId := tools.GetLogId(uid, rrb.Oid)
	num, e := db.GetNumOfIdBandToOneBankAccount(uid, logId)
	if e != nil {
		tools.FillDetails(rrb.Oid, uint(num), tools.ExecuteFailed, 0, e.Error(), ch, sy)
		return
	}
	log.Debug("同一银行卡使用相同身份证注册的个数:", num)
	tools.BigThanLimit(uint(num), ch, sy, rrb, rrb.Score)
}
